Special Fonts
نویسنده
چکیده
We propose the use of a special pseudofont as an enhancement (in a sense) of the \special instruction. The examples of the implementation show that the technique applied here would prove to be extremely useful, especially with METAPOST. keywords: cmdfont, special commands, MetaPost, fonts, PostScript Keen users of TEX, METAFONT, or METAPOST might find the instructions called “special” very mighty helpers. However, METAPOST imposes serious limit on them: their content is placed at the very beginning of a PostScript file that METAPOST produces, just after the %%Page comment, before the very first real PostScript statement. It means that METAPOST, unlike TEX and METAFONT, is not able to intersperse drawing commands (draw, fill) or typesetting commands (infont, btex ... etex) with a special user-defined content. This behaviour embitters the life of METAPOST users and leads to neck-breaking solutions. Even worse, TEX \special instructions are ignored by dvitomp, making oodles of TEX packages unusable inside a btex ... etex construct. The solution is to replace each \special instruction with a string typeset with a special-ly crafted font (pseudofont). We propose a natural name for it: cmdfont, command font. The text typeset with cmdfont has a special meaning when a TEXgenerated dvi or a METAPOST-generated eps file is processed—it is treated as a sequence of commands to be interpreted. The current article is the result of very preliminary thoughts—the idea is still very fresh. We are far from understanding all the consequences of this approach. Therefore, instead of developing a “general theory of specials,” we decided to present just a few examples illustrating various possible applications of special \special instructions. We have concentrated on using cmdfont with METAPOST. The use of pseudofonts with TEX, METAFONT, html or even major office editors is another thing. The reader may wish to evaluate the possibilities of special fonts. We perceive them as quite promising. ∗[email protected] †Polish Linux Users’ Group, [email protected] 96 b. jackowski and k. leszczyński What is the special font? Our special font can be defined with a short METAPOST program, cmdfont.mp: designsize:=10bp/pt epsilon; fontdimen 2: designsize; % font normal space fontmaking:=1; for i:=0 upto 255: beginfig(i-256); charwd:=charht:=chardp:=charic:=0; endfig; endfor end. The result of interpreting this program by METAPOST is cmdfont.tfm, i.e., a metric file which should be put somewhere where all tfm files reside. It contains 256 characters with all dimensions equal to zero. Most other font parameters are also set to zero. It is obvious that the font design size cannot be zero, but it is not obvious why the width of a space (fontdimen2) should be set to the design size. In fact, the actual size is not essential, any non-zero will do. Also, the actual design size value is not important as long as everybody who uses cmdfont takes the same designsize value. Please note that the beginfig parameter is negative. Negative arguments instruct the METAPOST interpreter to output all the eps files under the same name: cmdfont.ps. If we used a seemingly natural form, beginfig(i), our directory would be infested by cmdfont.0, cmdfont.1, . . . , cmdfont.255 files. We don’t need those files and it is easier to throw away one file than 256 files. Special font in a METAPOST program Let’s trace how the instructions referring to cmdfont are parsed by METAPOST. Consider the file named, say, infont.mp: beginfig(100); draw "META FONT" infont "cmdfont"; draw "META POST" infont "cmdfont" scaled 2; endfig; end. The resulting file, infont.100, reads: 1 %!PS 2 %%BoundingBox: 0 0 0 0 3 %%Creator: MetaPost 4 %%CreationDate: 2001.04.13:1950 5 %%Pages: 1 6 %*Font: cmdfont 10 10 20:80000000460708 7 %*Font: cmdfont 20 10 20:80000000440598 8 %%EndProlog
منابع مشابه
Fonts Invisibility using virtual fonts
The SL~IQX 'invisible' fonts are currently produced by a special set of METAFONT files; an alternative method of generating 'invisible' versions of any font is presented, using virtual fonts.
متن کاملParametrization of PostScript fonts through METAFONT: an Alternative to Adobe Multiple Master Fonts
In this paper we present a new method of parametrizing PostScript fonts in order to create font families. By changing parameter values one can obtain different weights, condensed or expanded versions, small caps as well as optically scaled fonts. The tool used to parametrize PostScript fonts is D. E. Knuth’s METAFONT program. Instead of designing a font from scratch, METAFONT is used as an extr...
متن کاملA Typesetter's Toolht
Over the past ten years, a variety of publications in the humanities has required the development of special capabilities, particularly in fonts for non-English text. A number of these are of general interest, since they involve strategies for remapping fonts and for generating composite glyphs from an existing repertory of simple characters. Techniques for selective compilation and remapping o...
متن کاملThe New Font Family Selection - User Interface to Standard Ipw Contents General Remarks 1.1 Special Math Alphabets Processing Older Documents Setting up a New Format 3.1 Preparations 3.1.1 Preloading Fonts 3.1.2 Making More Fonts Available 3.2 Running Iniw
In TUGboat 10, no. 2 we presented a new scheme to select fonts in T@ macro packages. This article describes the use of this new scheme in the IPTFJX environment. The technical parts of the interface (which are of some interest to readers who plan to use our scheme with other fonts or with other macro packages) will be published in a separate article. The necessary macros are distributed by the ...
متن کاملFonts lxfonts: L ATEX
The LATEX 2ε class slides used special fonts whose readability was exceptional. However, despite being part of the TEX system, they were not particularly efficient where mathematics was concerned. Since the time the LATEX3 Team abandoned slides, they have almost disappeared. This article describes the modifications and enhancements made to revive these historical fonts, and explains the package...
متن کاملCreation of a PostScript Type 1 logo font with MetaType 1
MetaType 1 is a tool created by Bogusław Jackowski, Janusz Nowacki, and Piotr Strzelczyk for creating PostScript Type 1 fonts. It uses METAPOST, t1utils and some AWK scripts to start from a METAPOST source with some special macros, resulting in the AFM, TFM and PFB files needed to use the font as any other PostScript font. MetaType 1 was used to create the Latin Modern fonts, derived from Compu...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2001